
function getContextPath() {

    var pathName = document.location.pathname;
    var index = pathName.substr(1).indexOf("/");
    var result = pathName.substr(0,index+1);
    return result;
}

var wetravel = {

    //封装所有url
    URL: {
        login: function () {
            return "/user/login";
        },
        index: function () {
            return "/";
        },
        checkAnswer:function (){
            return "/user/checkAnswer"
        }

    }
}
